<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>添加文章</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
	<link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}admin.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}tagcate.css" type="text/css">
	<link rel="stylesheet" href="{$url_js}fileinput/css/fileinput.min.css" type="text/css">

	<script type="text/javascript" src="{$url_js}jquery-2.2.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}bootstrap.min.js"></script>
	<script type="text/javascript" src="{$url_public}editor/ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="{$url_public}editor/ckfinder/ckfinder.js"></script>
	<script type="text/javascript" src="{$url_js}tagcate.js"></script>
	<script type="text/javascript" src="{$url_js}calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="{$url_js}AutoTips.js"></script>
	<script type="text/javascript" src="{$url_js}jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="{$url_js}jquery-ui.min.js"></script>
	<script type="text/javascript" src="{$url_js}jquery.contextmenu.r2.js"></script>
	<script type="text/javascript" src="{$url_js}calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="{$url_js}fileinput/js/fileinput.min.js"></script>
	<script type="text/javascript" src="{$url_js}fileinput/js/locales/zh.js"></script>
	<style type="text/css">
		{literal}
		.cover_img_div input[type="file"] {
			cursor: inherit;
			opacity: 0;
			z-index: 99;
		}

		.atlas1_img_div input[type="file"] {
			cursor: inherit;
			opacity: 0;
			z-index: 99;
		}

		.div-child-left {
			position: absolute;
			top: 0px;
			left: 0;
			width: 0px;
		}

		.cover_img_div {
			min-width: 163px;
			position: relative;
			float: left;
			margin: 4px;
			border: 1px solid #ddd;
			border-radius: 4px;
			text-align: center;
		}

		.atlas_img_div {
			width: 360px;
			height: 240px;
			position: relative;
			float: left;
			border: 1px solid #ddd;
			border-radius: 4px;
			text-align: center;
		}

		.input-file {
			position: absolute;
			left: 0;
			bottom: 0;
			width: 85px;
			z-index: 1;
		}

		.delete_btn {
			position: absolute;
			right: 0;
			bottom: 0;
			width: 55px;
			z-index: 1;
		}

		.div_btn {
			width: 100%;
		}

		.sort_input {
		}

		.sort_div {
			margin: 10px 75px;
			float: left;
		}

		.div_btn input {
			width: 7%;
		}

		div.cate-wrapper ul.cate-list {
			max-height: 400px;
			overflow: auto
		}

		.atlas_img_div img {
			height: 240px
		}

		/*
		 * user auto tips css
		 */
		ul {
			list-style: none outside none;
			margin: 0px;
			padding: 0px;
			-webkit-padding-start: 0px;
		}

		.recipients-tips {
			font-family: Tahoma, Arial;
			position: absolute;
			background: #fff;
			z-index: 2147483647;
			padding: 2px;
			border: 1px solid #ccc;
			display: none;
			margin: 0px;
		}

		.recipients-tips li a {
			display: block;
			padding: 5px 10px;
			color: #333;
			cursor: pointer;
			font-family: Tahoma, Arial;
		}

		.recipients-tips li a:hover {
			text-decoration: none;
		}

		.recipients-tips li a em {
			font-weight: 700;
			color: #000;
			font-family: Tahoma, Arial;
		}

		.autoSelected {
			background: #f4f4f4;
			font-family: Tahoma, Arial;
		}

		.btn_margin input {
			margin: auto 50px;
		}

		.file-drop-zone {
			min-height: 198px;
		}

		.file-thumbnail-footer {
			display: none;
		}

		.audio .file-preview-frame {
			height: 28px !important;
		}

		.audio .file-drop-zone {
			min-height: 92px;
		}

		.div_btn {
			width: 100%;
		}

		.div_btn input {
			width: 7%;
		}

		{/literal}
	</style>
</head>
<body>


<div class="container" style="width:96%">
	<form action="?do=Update" method="post" enctype="multipart/form-data">
		<input type="hidden" name="Id" value="{$info['Id']}"/>
		<table id="myformtable" class="table table-bordered table-striped" align="center">
			<tbody>
			<tr>
				<td colspan="2"><h5>修改活动详情</h5></td>
			</tr>
			<tr>
				<td style="width: 120px;">名称：</td>
				<td><input type="text" id="Name" name="Name" value="{$info['Name']}" style="width: 300px"/></td>
			</tr>
			<tr>
				<td class="col-xs-2"><span style="color: red">*</span>商家分类：</td>
				<td>
					<select id="CateId" name="CateId" class="form-control" style="width: 100px;">
						{foreach $cate as $v}
							<option value="{$v.Id}" {($info['CateId']==$v['Id'])?'selected="selected"':''}>{$v.Name}</option>
						{/foreach}
					</select>
				</td>
			</tr>
			<tr>
				<td style="width: 120px;">城市：</td>
				<td><input type="text" id="CityId" name="CityId" value="1" style="width: 100px"/><em>暂时只开放醴陵 ID:1</em></td>
			</tr>
			<tr>
				<td>活动规则说明：</td>
				<td>
					<textarea class="form-control" rows="6" id="Description" name="Description"
					          style="width: 50%">{$info['Description']}</textarea>
				</td>
			</tr>
			<tr>
				<td>活动开始时间：</td>
				<td><input class="form-control" id="StartTime" name="StartTime" style="width: 300px" type="text"
				           onFocus="WdatePicker({literal}{startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'EndTime\')}'}{/literal});"
				           value="{if $info['StartTime']}{$info['StartTime']}{/if}" readonly=""></td>
			</tr>
			<tr>
				<td>活动结束时间：</td>
				<td><input class="form-control" id="EndTime" name="EndTime" style="width: 300px" type="text"
				           onFocus="WdatePicker({literal}{startDate:'%y-%M-%d 23:59:59',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'StarTime\')}'}{/literal});"
				           value="{if $info['EndTime']}{$info['EndTime']}{/if}" readonly=""></td>
			</tr>
			<tr>
				<td>状态：</td>
				<td>
					<select id="Status" name="Status" class="form-control" style="width: 100px;">
						<option value="1" {if $info['Status'] == 1}selected{/if}>正在进行</option>
						<option value="2" {if $info['Status'] == 2}selected{/if}>已结束</option>
					</select>
				</td>
			</tr>
			<tr>
				<td>更新时间：</td>
				<td>{$info['UpdateTime']}</td>
			</tr>
			<tr>
				<td>创建时间：</td>
				<td>{$info['CreateTime']}</td>
			</tr>
			<tr>
				<td colspan="2" style="text-align: center;">
				<span style="display: inline-block;margin: 0px auto;" class="btn_margin">
				<input type="submit" id="add_btn" class="btn btn-primary" value="保存"/>
				<input type="button" class="btn btn-default" onclick="javascript:history.go(-1)" value="返回"/>
				</span>
				</td>
			</tr>
			</tbody>
		</table>
	</form>
</div>

{literal}
	<script type="text/javascript">
        $("#add_btn").click(function () {
            var Name = $.trim($('#Name').val());
            if (!Name.length) {
                top.swal('出错了', '请填写名称！', 'error');
                return false;
            }
            return true;
        });
	</script>
{/literal}

</body>
</html>
